<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head>
  <script language="javascript">
	function loadValues() {
	//alert('eklsdklf');
	
		var datas=JSON.parse(Android.sendValueToJs());
		//alert(datas.userName);
		document.usersForm.userName.value=datas.userName;
		document.usersForm.firstName.value=datas.firstName;
		document.usersForm.lastName.value=datas.lastName;
		document.usersForm.address.value=datas.address;
		//document.usersForm.job.value=datas.job;
		//alert(Android.sendValueToJs());
		document.getElementById("test").innerHTML="Testing";
	}
	function returnFormValues(){
	//alert("hello");
	var json = " {\"userName\" :"+ escape(document.usersForm.userName.value) +","+
					"\"firstName\" :"+escape(document.usersForm.firstName.value)+","+
					"\"lastName\" :"+ escape(document.usersForm.lastName.value)+","+
					"\"address\" :"+ escape(document.usersForm.address.value) +"}";


	Android.receiveValueFromJs(json);
	
	}
</script>
  </head>
  <body onload="loadValues();">
    <h3>
      Enter the Details
    </h3>
    <form name="usersForm" >
      <table>
	  <div id="test"></div>
        <tr>
          <td>
            UserName :
          </td>
          <td>
            <input type="text" name="userName">
			
          </td>
        </tr>
        <tr>
          <td>
            FirstName :
          </td>
          <td>
            <input type="text" name="firstName">
          </td>
        </tr>
        <tr>
          <td>
            LastName :
          </td>
          <td>
            <input type="text" name="lastName">
          </td>
        </tr>
        <tr>
          <td>
            Address :
          </td>
          <td>
            <input type="text" name="address">
          </td>
        </tr>
		<!--
        <tr>
          <td>
            Job :
          </td>
          <td>
            <input type="text" name="job">
          </td>
        </tr>
		-->
      </table>
    </form>
  </body>
</html>
